
import 'package:flutter/material.dart';
import 'package:flutter_app/stateLearn/click_txt.dart';

class NavigatorLearn extends StatelessWidget {
  const NavigatorLearn({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(builder: (context,widget){
      return Scaffold(
        appBar: AppBar(title: const Text('navigator测试'),),
        body: Center(
          child: ClickTxt(onPressed: (){
            Navigator.of(context).pop("返回上一页");
          },info: "返回上一页",),
        ),
      );
    },);
  }
}
